<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/tagInclude.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<base href="${basePath}"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="${basePath}styleAdmin/css/portalinabox.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="${basePath}styleAdmin/js/prototype-1.6.0.3.js"></script>
<script type="text/javascript" src="${basePath}styleAdmin/js/common.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>查看${tblName}</title>
<script type="text/javascript">
	function doQuery(){
		document.myform.submit();
	}
</script>
</head>
<body bottomMargin="0" leftMargin="0" rightMargin="0" topmargin="0">
<form action="${basePath}admin/dbTable/queryTable" method="post" name="myform">
<input type="hidden" name="tblName" id="tblName" value="${tblName}">
<%@include file="../common/navigate.jsp" %>
<table width="96%" border="0" align="center" cellpadding="0" style="margin-top:5px;" cellspacing="0">
	<tr>
		<td valign="top">
			<!-- 搜索栏 -->
			<table width="100%" border="1" class="mainFunctionTable"  cellpadding="0" cellspacing="1">
				<tr height="25" class="pLabel">
			   		<td class="td_nwarpstyle">&nbsp;&nbsp;查看&nbsp;${tblName}&nbsp;属性数据</td>
			 	</tr>
				<tr height="25" align="center">
			   		<td>
						<textarea rows="10" cols="100" name="sql" id="sql">select * from ${tblName} limit 0,15</textarea>
						<br/><br/>
						<a href="javascript:doQuery();"><img src="${basePath}styleAdmin/images/button/query.gif" border="0"/></a>
					</td>
			 	</tr>
			 </table>
		  </td>
	  </tr>
	  <tr>
	    <td>
			<table width=100% border=1 class="mainFunctionTable"  cellpadding="0" cellspacing="1" id="table_channel">
				<tr height=25 class="pLabel" align="center">
					<td width="15%" class="td_nwarpstyle">Field</td>
					<td width="10%" class="td_nwarpstyle">Type</td>
					<td width="5%" class="td_nwarpstyle">Null</td>
					<td width="5%" class="td_nwarpstyle">Key</td>
					<td width="15%" class="td_nwarpstyle">Default</td>
					<td width="10%" class="td_nwarpstyle">Extra</td>
				</tr>
			</table>
			<table width=100% border=1 class="mainFunctionTable"  cellpadding="0" cellspacing="1" id="table_channel">
				<c:forEach items="${tableDescs}" var="table" varStatus="status">
   					<c:choose>
   						<c:when test="${status.index % 2 == 0 }"><c:set var="css" value="c1" /></c:when>
   						<c:otherwise><c:set var="css" value="c2" /></c:otherwise>
   					</c:choose>
					<tr height=25 class="${css}">
						<td width="15%">${table.field}</td>
						<td width="10%">${table.type}</td>
						<td width="5%">${table.isNull}</td>
						<td width="5%">${table.key}</td>
						<td width="15%">${table.isDefault }</td>
						<td width="10%">${table.extra}</td>
					</tr>
				</c:forEach>
	  		</table>
		 </td>
	   </tr>
</table>
</form>
</body>
</html>